package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.CommentListBean;
import com.hlhj.funlike_business.moudle.CommentMoudle;
import com.hlhj.funlike_business.views.CommentView;

import java.util.List;

public class CommentPresenter extends BasePresenter<CommentMoudle,CommentView> implements CommentMoudle.getCommentList {
    @Override
    public void createModule() {
        module = new CommentMoudle();
        module.setListener(this);
    }

    public void LoadCommentList(Context context,int page){
        module.LoadCommentList(context,page);
    }

    public void LoadDelResult(Context context,int id){
        module.LoadDelResult(context,id);
    }

    public void LoadReplyResult(Context context,int id,String content){
        module.LoadReplyResult(context,id,content);
    }


    @Override
    public void loadCommentList(List<CommentListBean.DataBeanX.DataBean> dataBeans) {
        getView().showCommentList(dataBeans);
    }

    @Override
    public void showResult(String msg) {
        getView().showResult(msg);
    }
}
